#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(void){
	int n=0,a=0,b=0,temp=0;
	vector<int> data;
	cin>>n;
	cin>>b;
	for(int i=1;i<n;i++){
		a=b;S
		cin>>b;
		data.push_back(b>a?b-a:a-b);
	}
	sort(data.begin(),data.end());
	for(int i=1;i<data.size();i++){
		if(data[i]-data[i-1]!=1){
			cout<<"Not jolly";
			return 0;
		}
	}
	cout<<"Jolly";
	return 0;
}